package com.cn.qgx428.lazydiary.prump

import com.cn.qgx428.lazydiary.prump.clock.StikyNoteClock

/**
 * Created by qinguanxiong on 2018/4/9.
 */

/**
 * 主要职责： 筛选最近的Clock
 */
class ClockManager {

    private constructor()

    companion object {
        fun getNextClock(): BaseClock?{
            val clocks = mutableListOf<BaseClock>()
            val stikyNoteClock = StikyNoteClock()
            if (stikyNoteClock.getRealClock() != null){
                clocks.add(stikyNoteClock)
            }
            //
            if (clocks.size!=0){
                clocks.sortBy { it.mAlarmTime }
                return clocks.get(0)
            }

            return null
        }
    }
}